import request from '@/utils/request'

export function getList(query) {
  return request({
    url: '/web-api/system/user',
    method: 'get',
    params: query
  })
}

export function getRoleList() {
  return request({
    url: '/web-api/system/role/all',
    method: 'get'
  })
}

export function create(data) {
  return request({
    url: '/web-api/system/user',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/web-api/system/user',
    method: 'put',
    data
  })
}

export function resetPassword(data) {
  return request({
    url: '/web-api/system/user/resetPassword',
    method: 'post',
    data
  })
}

export function updatePassword(data) {
  return request({
    url: '/web-api/system/user/updatePass',
    method: 'post',
    data
  })
}
